import Mock from 'mockjs';
// 搜索数据
let searchList = [{
  id: 1,
  gameName: '全部'
}, {
  id: 2,
  gameName: '角色角色角色角色角色角色角色角色角色角色'
}, {
  id: 3,
  gameName: '传奇'
}, {
  id: 4,
  gameName: '卡牌'
}, {
  id: 5,
  gameName: '冒险'
}];
// 游戏列表数据
let gameList = [{
    "id": 124491,
    "classify": "IOS",
    "name": "物料同步and物料同步and物料同步and物料同步and",
    "status": 1,
    "cpurl": "",
    "run_time": "",
    "audit_status": 4,
    "packageurl": "",
    "video": "",
    "m_icon": "/upload/image/20190717/5d2ed648d94ac.jpg",
    "video_status": 2,
    "video_note": "",
    "game_note": "",
    "is_edit": "1",
    "icon": ""
  },
  {
    "id": 124490,
    "classify": "安卓",
    "name": "物料同步and",
    "status": 1,
    "cpurl": "",
    "run_time": "",
    "audit_status": 4,
    "packageurl": "ldmpand_124490/ldmpand_124490.apk",
    "video": "",
    "m_icon": "/upload/image/20190717/5d2ed648d94ac.jpg",
    "video_status": 0,
    "video_note": "",
    "game_note": "",
    "is_edit": "1",
    "icon": ""
  },
  {
    "id": 123349,
    "classify": "安卓",
    "name": "师傅打发",
    "status": 1,
    "cpurl": "",
    "run_time": "",
    "audit_status": 1,
    "packageurl": "jmtd_flb_and_123349/jmtd_flb_and_123349.apk",
    "video": null,
    "m_icon": null,
    "video_status": "4",
    "video_note": "",
    "game_note": "",
    "is_edit": "1",
    "icon": ""
  },
]

// 添加视频获取关联游戏列表
let linkList = [{
    id: 0,
    gameName: "全部"
  }, {
    id: 1,
    gameName: "大话西游(安卓)"
  },
  {
    id: 2,
    gameName: "倩女幽魂(ios)"
  }
]
export default {
  getgameList: config => { //列表数据
    return {
      code: 200,
      data: {
        total: 10,
        list: gameList
      }
    }
  },
  getsearchList: config => { //搜索
    return {
      code: 200,
      data: {
        list: searchList
      }
    }
  },
  addpromtoVideo: config => { //添加宣传视频
    return {
      code: 200,
      data: {
        config
      }
    }
  },
  addgame: config => {
    return {
      code: 200,
      data: {
        linkList
      }
    }
  },
  getEditgameList: config => {
    return {
      "code": "200",
      "msg": "请求成功",
      "data": {
        "gameTypesLabelList": [ // 游戏类型
          {
            id: 189,
            name: "满V"
          },
          {
            id: 278,
            name: "角色"
          },
          {
            id: 200,
            name: "dada"
          },
          {
            id: 188,
            name: "满Vv"
          },
          {
            id: 260,
            name: "角色www"
          },
          {
            id: 270,
            name: "策略lll"
          }
        ],
        "gameVipLabelList": { // 赠送vip标签
          "93": "上线送VIP6",
          "98": "上线送VIP2",
          "107": "上线送VIP5"
        },
        "gameChargeLabelList": { // 充值比例标签
          "86": "首充1:400",
          "99": "充值1:200",
          "106": "首充1:300",
          "120": "首充1:600"
        },
        "gameGivenTypeLabelList": { // 赠送类型标签
          "95": "充值返利",
          "311": "GM版"
        },
        "gameDetail": { // 游戏详情数据结构
          // icon保存路径
          "iconSavePath": "\/upload\/20190704\/5d1db127c8712.jpg",
          // icon预览url
          "iconPreviewUrl": "http:\/\/static-inc.zaoyx.com\/upload\/20190704\/5d1db127c8712.jpg?x-oss-process=style\/game_icon",
          // 新游预告图保存路径 
          "previewImageSavePath": "\/upload\/image\/20200327\/5e7d9d61b68d0.jpg",
          // 新游预告图预览url 
          "previewImagePreviewUrl": "http:\/\/static-inc.zaoyx.com\/upload\/image\/20200327\/5e7d9d61b68d0.jpg?x-oss-process=style\/game_icon",
          "gameIssueTime": '', // 游戏首发时间
          "gameTypesLabelChecked": [ // 游戏类型选中项
            200,
            188
          ],
          "gameVipLabelChecked": "619", //vip标签选中项
          "gameChargeLabelChecked": "149", // 充值比例标签选中项
          "gameGivenTypeLabelChecked": "95", // 赠送类型标签选中项
          "isRebate": 1, // 1.无返利  2.有返利
          "rebateGivenType": 1, // 返利发放方式  1.手动发放  2.自动发放
          "rebateAmount": 800, // 提交返利须满足金额
          "rebateDescription": "1返利金额仅限单日累积.....", // 返利描述
          "vipDescription": "1无VIP222222", // vip描述
          "gameIntroduction": "1《弹弹堂大乱斗》一款针.....", // 游戏简介
          "fineDescription": "1", // 精品标签
          "gameDetailImageList": [ // 游戏截图数据结构
            {
              // 预览url
              "previewUrl": "http:\/\/static-inc.zaoyx.com\/upload\/20180815\/5b73cd26bc642.jpg",
              // 保存url
              "url": "\/upload\/20180815\/5b73cd26bc642.jpg",
              // 回显名称
              "alt": "1.jpg"
            },
            {
              "previewUrl": "http:\/\/static-inc.zaoyx.com\/upload\/20180815\/5b73cd2716ecc.jpg",
              "url": "\/upload\/20180815\/5b73cd2716ecc.jpg",
              "alt": "2.jpg"
            }
          ],
          "gamePublicityImageList": [ // 宣传图数据结构
            {
              // 预览url
              "previewUrl": "http:\/\/static-inc.zaoyx.com\/upload\/20190315\/5c8add3656ff9.jpg",
              // 保存url
              "url": "\/upload\/20190315\/5c8add3656ff9.jpg",
              // 回显名称
              "alt": "5c7ba47536295.jpg"
            }
          ]
        }
      }
    }
  },
  submitEditForm: config => {
    return {
      code: 200,
      data: {
        config
      }
    }
  },
  getlinkgame: config => {
    return {
      code: 200,
      data: {
        list: linkList
      }
    }
  },
  submitAudit: config => {
    return {
      code: 200,
      data: {
        config
      }
    }
  }

}
